package com.weiai.wedding.dao.cases;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.weiai.wedding.entity.cases.Cases;

/**
 * @author wangweiheng
 *
 */
public interface CasesDao extends PagingAndSortingRepository<Cases, Long> {
	
	@Query("select a from Cases a where a.status = 'A' order by a.createDate desc")
	List<Cases> findAllList();
	
	@Query("select a from Cases a where a.status = 'A' order by a.createDate desc")
	Page<Cases> findAllList(Pageable pager);
}
